home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / dbtext.dxr / 00019_scroll Thumb subclass.ls < prev    next >
Encoding:
Text File  |  2000-01-18  |  1.1 KB  |  35 lines

  1. property ancestor, pMember, pLineHeight
  2. global gDBTextVarList
  3.  
  4. on new me, theSliderName, thecast, theThumbChannel, theThumbLoc, minPixel, maxPixel, initialSetting, numSettings, minSetting, maxSetting, isContinuous, isHoriz, directionOfIncrease, descendant
  5.   if objectp(descendant) then
  6.     PassVar = descendant
  7.   else
  8.     PassVar = me
  9.   end if
  10.   ancestor = new(script("slider thumb"), theSliderName, thecast, theThumbChannel, theThumbLoc, minPixel, maxPixel, initialSetting, numSettings, minSetting, maxSetting, isContinuous, isHoriz, directionOfIncrease, PassVar)
  11.   MyObj = getaProp(gDBTextVarList, GetObjProp())
  12.   xSprite = getaProp(GetSpriteList(MyObj), #text)
  13.   pMember = the member of sprite xSprite
  14.   pLineHeight = the textHeight of member pMember
  15.   return me
  16. end
  17.  
  18. on performFunction me
  19.   MyObj = getaProp(gDBTextVarList, GetObjProp())
  20.   scroll(MyObj, me.pSetting - 1)
  21.   member(pMember).scrollTop = pLineHeight * (me.pSetting - 1)
  22.   updateStage()
  23.   return me
  24. end
  25.  
  26. on disable me
  27.   me.pIsDisabled = 1
  28.   set the loc of sprite the pThumbChannel of me to point(-9999, -9999)
  29.   return me
  30. end
  31.  
  32. on buttonLoc me
  33.   return me
  34. end
  35.